home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Topik
/
Topik - Disk 36 - Archivers (19xx)(Topik Public Domain)(PD)[WB].zip
/
Topik - Disk 36 - Archivers (19xx)(Topik Public Domain)(PD)[WB].adf
/
LZ
/
LZ.doc
< prev
next >
Wrap
Text File
|
1990-10-07
|
12KB
|
263 lines
*** TOPIK Note : There's a few problems with this program when run on an
* Amiga 2500 which may be the same for large similar systems, which
* can be simply fixed by raising the stack real high....like perhaps
typing STACK 100000 in the CLI, that should do it, but if there is
still a problem, then raise it higher perhaps.
LZ is in this directory, accessible from the CLI/SHELL. Rob.
LZ 0.82 BETA
30th June, 1990
Written by Jonathan Forbes
Copyright © 1990, Xenomiga Technology
About LZ
LZ is NOT freeware; if you use it and like it, please send a shareware
registration of $10 (Cdn.$ or U.S.$) to the address given below. If you send
$25 and your address, you will receive the full source code to LZ on a disk.
Send contributions to:
Xenomiga Technology
1132 Bay Street, Suite #1101
Toronto, Ontario
M5S 2Z4
Canada
Distribution
LZ is a freely distributable, copyrighted piece of software. You may
upload it wherever you choose, but you are not allowed to sell LZ for profit,
or include LZ on a disk which is sold for profit, without the author's
(Jonathan Forbes) permission.
The LZ package (LZ081.LZH) consists of two files; LZ, and LZ.doc, neither
of which may be modified in any way. However, LZ081.LZH may be recompressed
with another archiver such as Zoo, Zip (ugh), etc.
And, as mentioned above, LZ is shareware.
Disclaimer
I am in no way responsible for anything this program does; you are using it
entirely at your own risk! This is especially true for this 0.82 beta version.
If you don't want to take any risks, then *don't* use it!
What is Lz?
Lz (which I pronounce "el zed", but which you will probably pronounce
"el zee") is the fastest .LZH archiver and extractor available for the Amiga!
Lz is compatible with MS-DOS version 1.13c of Lharc and Amiga Lharc 1.0.
Acknowledgements
The original Lharc (MS-DOS) was written by Haruyasu Yoshizaki. I took his
freely distributable source code "lzhuf.c", and rewrote it in assembly
language. I used "lharc.c" (which is full of MS-DOS specific code) as a
reference, but did not use it as a base for the Amiga version, which I wrote
from scratch.
For testing purposes, I used Amiga Lharc 1.0, ported by Paolo Zibetti.
How fast is Lz?
Lightning fast. If you've been using Lharc to compress or decompress files,
then you're in for a big surprise. If you've been using Lhunarc 0.96 (also
written by me), and thought that was fast, then prepare yourself for some major
speed increases, because Lz is faster still! Lz is between 16% and 25% faster
than Lhunarc 0.96, and that's no joke in terms of speed!
I have pushed the decompression algorithm almost to its limits. No other
.LZH extractor can even come -close- to Lz's decompression times. Things
simply can't get much faster. Yes, I know I said that in the Lhunarc 0.96
documentation too, but this time I'm pretty sure I'm almost at the limit!
Here follows a small speed comparison. The files being compressed and
decompressed were those on Fred Fish disk #245.
* - Different algorithm/encoding scheme
* *
| (0.82) | (1.0) | (.99d) | (1.01) | (1.40)
| LZ | Lharc | LharcA | PkaZip | Lhwarp
Fish245.LZH | 11:33 | 26:29 | ? | 10:31 | 13:43 <-- compressing
| 1:47 | 5:12 | 2:34 | 2:53 | 2:51 <-- decompressing
LZ certainly kills everything else dead, but is it faster than PkaZip?
Well, sometimes it is, but usually it isn't. However, LZ (and Lharc, etc.)
almost always compresses files better than Zip. For example, "MegRyan.lzh"
(a complete 655k digitised sound sample of the famous restaurant scene from
When Harry Met Sally), compresses from 655302 bytes to 488679 when LZ is used,
while the equivalent .zip file is 536773 bytes long. LZ compresses the file
faster than Zip, too.
Anyway, enough of .lzh vs. .zip for now... it's up to you.
A Beta Version?
Yes, this version is LZ 0.82 BETA. Just over 80% of it has been done (how
I came up with that figure I'll never know.)
LZ has not been tested to exhaustion. It compresses and decompresses files
fine (and is far more intelligent than Lhunarc 0.96), but there's always the
possibility of a bug or two remaining (although I seriously doubt there are
any -dangerous- bugs remaining; i.e. bugs which produce corrupted archives.)
Anyway, the practical upshot of all this is that if you want to play it safe,
then use LZ only for decompressing; the algorithm has been sitting in Lhunarc
0.96 for months now, without any problems, and any bugs will show up as CRC
errors. Most people don't compress that many files, anyway.
(Note: I'm not saying the compression algorithm is buggy; just that it
isn't as mature as the decompression algorithm.)
LZ does not yet have all of its options implemented; the commands not
implemented are: move, freshen, update, and fix (the latter is a nonstandard
Lharc command which will rebuild corrupted archives.) I've never used any
of these commands before, anyway, so hopefully, most of you won't miss them.
A quick summary of the implemented commands:
a Add file(s) to archive. Wildcards accepted.
e,x Extract file(s) from archive. If any filenames follow the archive name
then only those files will be extracted. Wildcards are permitted. If
any of the filenames have a '/' or ':' as the ultimate character, then
that directory will be used as the destination directory. E.g.:
Lz -x fish245.lzh generalinfo.info dh3:fishdir/ atof/atof vlt/.info
will extract generalinfo.info, atof/atof, and vlt/.info to dh3:fishdir/
l,v View archive contents.
d Delete file(s) from archive. Wildcards accepted. To delete all .foo
files from all your .lzh files, type: Lz d #? #?.foo
Please note that items in subdirectories are also checked, so that
#?.info will delete *all* .info files in the archiver, wherever they
may be.
When creating archives, individual files are compressed in the work
directory, which defaults to T: if it exists or the current directory
otherwise. The work directory can be changed with the -w option.
Like Lharc, LZ uses the decimal address of its task structure for creating
temporary filenames, so that multiple copies can run simultaneously without
conflict (and no, LZ is not reentrant; I *like* global variables.)
What do the options do? Well, first of all, if you're not familiar with
Lharc by Paolo Zibetti, read his Lharc documentation files; I've tried to
remain as compatible as possible with Amiga Lharc 1.0. I'll write the
documentation for LZ later on; I'm too busy right now.
It is important to remember the behaviour of the -a (preserve file
attributes) command; if this is not specified, then all files archived or
extracted will be "rwed." If this flag is used, then all attributes (rwedsaph)
will be preserved. When extracting, use -a only on files which have been
compressed by Amiga .lzh archivers; if you don't, you'll end up with files with
strange attributes (although no harm will be done.) Similarly, if you know
that your archive might be extracted on an IBM system, don't use the -a option,
because they'll have similar problems.
Here follows a quick reminder of how to archive subdirectories recursively:
Lz -x -r a myarchive.lzh blah/#?
Will archive everything (subdirectories and all) in blah/. If you don't
wish to archive subdirectories, then it's just Lz -x a myarchive.lzh blah/#?
(which will still preserve the path name.)
Options which I have added are:
-c confirm filenames; will prompt you with yes/no/all/quit for every
file to be added to or extracted from an archive. Useful in
conjunction with wildcards.
-i set input buffer size to the number immediately following the option.
For example, -i32768 would give you a 32k input buffer. Changing the
input or output buffer size on an 68000 Amiga when all work is being
done in a RAM drive doesn't speed things up; these options are mainly
for floppy drive users and 68020-68040 users.
-o ditto for the output buffer. Both input and output buffers default
to 8192 (8k) bytes. However, twice as much memory as specified is
allocated for the output buffer; this is because LZ originally wrote
data asynchrously until I found out that this doesn't speed things up
on a RAM drive. It probably speeds things up on a floppy drive,
however, so I left the dual buffers in. This version of LZ does NOT
write asynchrously, however; the extra output buffer just takes up
memory, for now.
-z zero compression; just store files in the archive.
-Z conditional zero compression; don't attempt to compress files ending
in .lzh, .lhw, .zip, .zoo, .arc, .pak, .wrp or .zap. Useful for
compressing disks which already have archives on them.
LZ saves and restores files to their proper dates and attributes, unlike
Lhunarc.
If you find yourself using certain options with LZ most of the time, you
might want to make them an alias. For example:
alias lx lz -i32768 -o32768 -x []
would make a new command called "LX" which would extract files with a 32k
buffer. Or, if you still find yourself typing "Lhunarc" all the time:
alias lhunarc lz -i32768 -o32768 -x []
The above two commands work only with shells which support aliases. Your
shell might have a different way of doing it; I use AmigaDOS 1.3 and Arp 1.3.
The arp.library is required for LZ, by the way.
So why am I releasing an incomplete, not fully tested version? The reason
is that I'm leaving for Winnipeg, Manitoba in two days, and that's where I'll
be for the next month, at the Shad Valley programme. I'm releasing this
program, in part, to update Lhunarc 0.96. I also don't want any other .lzh
archiver to appear while I'm gone and render Lhunarc obselete; LharcA lags
far far behind both Lhunarc and Lz, but it might get within 15%. Lhunarc also
had a couple of bugs (both were inconsequential; it couldn't handle certain
combinations of deeply nested directories, and it created directories in view
mode) which LZ fixes.
Besides, I want this program to get around so that people will have compiled
lots of revealing benchmarks by the time I get back ;-) No one seems to have
done this yet!
Anyway, remember that this is a PRE-RELEASE of LZ, and it may contain a
small bug or two. I'll be gone from the 1st of July until the 28th, so you'll
have to save your suggestions and criticisms for then.
Thanks to Steve Tibbett for showing me how to speed up Lhunarc 0.96 by 3%
(every percent counts), how to produce smaller executables using RawDoFmt() and
__tinymain, for finding the bug in the view command, for sending me Raw() and
Cooked(), and for informing me that the A3000 spends more time doing disk i/o
than it does decompressing (hence a user configurable buffer.)
I'll have another version of Lhwarp out in two months or so, which may or
may not use Yoshi's new Lharc algorithm which is currently undergoing beta
testing at version 1.90; it produces smaller files than the existing Lharc,
and is quicker to boot.
As an aside; thanks to all those who helped get Lhwarp off the ground to
stable versions 1.30/1.31 and 1.40; if it weren't for Lhwarp, neither Lhunarc
nor LZ would exist. A big *HI* to Rob Collinsworth; thanks for all your
invaluable help when I most needed it!
Please excuse this document's complete lack of style and organisation;
because it was done at the last minute, I didn't have the time to refine every
sentence like I usually do.
--- EOF